﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Include/Admin.master" AutoEventWireup="true"
    CodeFile="Manage.aspx.cs" Inherits="Admin_TouShu_Manage" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    <link href="../../Style/Common/DatePage.css" rel="stylesheet" type="text/css" />
    <link href="../../Scripts/jquery-easyui-1.3.1/themes/default/easyui.css" rel="stylesheet"
        type="text/css" />
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <table cellspacing="0" cellpadding="0" style="width: 100%; height: 30px; padding-bottom: 5px;
        border: 1px; border-color: #66CCFF;">
        <tr style="background-image: url('../../images/管理员页面/title_bg1.jpg'); background-repeat: repeat-x;">
            <td style="font-weight: bold; font-size: large; font-family: 仿宋;">
                <strong>【用户投诉管理】</strong>
            </td>
        </tr>
    </table>
    <table class="editTable" cellspacing="1">
        <tr>
            <th>
                被投对象类型
            </th>
            <td>
                <asp:DropDownList ID="drpDXLX" runat="server">
                </asp:DropDownList>
            </td>
            <th>
                被投诉用户名
            </th>
            <td>
                <asp:TextBox ID="txtGetUserName" runat="server" />
                <img id="search1" class="cursor" alt='查询' src="../../images/管理员页面/search.png" /><img
                    alt='清空' class="cursor" id="clear1" src="../../images/管理员页面/clear.gif" />
            </td>
            <th>
                处理状态
            </th>
            <td>
                <asp:DropDownList ID="drpStatus" runat="server">
                </asp:DropDownList>
            </td>
            <th>
                添加时间
            </th>
            <td>
                从：<asp:TextBox ID="txtAddTimeFrom" runat="server" class="easyui-datetimebox"></asp:TextBox>到：<asp:TextBox
                    ID="txtAddTimeTo" runat="server" class="easyui-datetimebox"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <th>
                投诉用户
            </th>
            <td>
                <asp:TextBox ID="txtADdUserID" runat="server"></asp:TextBox>
                <img alt='查询' id="search2" src="../../images/管理员页面/search.png" class="cursor" /><img
                    id="clear2" alt='清空' class="cursor" src="../../images/管理员页面/clear.gif" />
            </td>
            <th>
                关键字
            </th>
            <td>
                <asp:TextBox ID="txtKey" runat="server"></asp:TextBox>
            </td>
            <td colspan="4">
                <asp:Button ID="btnSearch" runat="server" Text="搜索" />
            </td>
        </tr>
    </table>
    <br />
    <asp:ListView ID="lvDate" runat="server" DataKeyNames="ID" OnItemCanceling="lvDate_ItemCanceling"
        OnItemDeleting="lvDate_ItemDeleting" OnItemEditing="lvDate_ItemEditing" OnItemUpdating="lvDate_ItemUpdating"
        OnPagePropertiesChanged="lvDate_PagePropertiesChanged">
        <LayoutTemplate>
            <table class="editTable" width="100%" cellspacing="1">
                <tr>
                    <th>
                        投诉类型
                    </th>
                    <th>
                        投诉用户
                    </th>
                    <th>
                        投诉内容
                    </th>
                    <th>
                        被投诉对象用户
                    </th>
                    <th>
                        投诉时间
                    </th>
                    <th>
                        投诉状态
                    </th>
                    <th>
                        处理结果
                    </th>
                    <th>
                        操作
                    </th>
                </tr>
                <asp:PlaceHolder ID="itemPlaceholder" runat="server"></asp:PlaceHolder>
            </table>
        </LayoutTemplate>
        <ItemTemplate>
            <tr>
                <td>
                    <%#Enum.GetName(typeof(TouShu.type), Eval("Type"))%>
                </td>
                <td>
                    <%#GetUserName(Eval("RelationUserID"))%>
                </td>
                <td>
                    <%#Eval("Des")%>
                </td>
                <td>
                    <%#GetUserName(Eval("GetUserID"))%>
                </td>
                <td>
                    <%#DongDong.Common.Misc.ConvertToShortDateTime(Eval("AddTime"),"yyyy年MM月dd日")%>
                </td>
                <td>
                    <%#Enum.GetName(typeof(TouShu.status), Eval("Status"))%>
                </td>
                <td>
                    <%#string.IsNullOrEmpty(Eval("Result").ToString().Trim()) == true ? "处理结果为空" : Eval("Result")%>
                </td>
                <td>
                    <asp:LinkButton ID="lbtnEdit" runat="server" CommandName="Edit" Text="修改"></asp:LinkButton>&nbsp;&nbsp;
                    <asp:LinkButton ID="lbtnDelete" runat="server" Text="删除" OnClientClick="return confirm('您确定要删除该项吗?');"
                        CommandName="Delete"></asp:LinkButton>
                </td>
            </tr>
        </ItemTemplate>
        <EditItemTemplate>
            <tr>
                <td>
                    <%#Enum.GetName(typeof(TouShu.type), Eval("Type"))%>
                </td>
                <td>
                    <%#GetUserName(Eval("RelationUserID"))%>
                </td>
                <td>
                    <%#Eval("Des")%>
                </td>
                <td>
                    <%#GetUserName(Eval("GetUserID"))%>
                </td>
                <td>
                    <%#Eval("AddTime")%>
                </td>
                <td>
                    <asp:DropDownList ID="drpStatus" runat="server">
                    </asp:DropDownList>
                </td>
                <td>
                    <asp:TextBox ID="txtResult" runat="server" Text='<%#Eval("Result")%>' MaxLength="50"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtResult"
                        ErrorMessage="处理结果不能为空" SetFocusOnError="true" ValidationGroup="Update"></asp:RequiredFieldValidator>
                </td>
                <td style="width: 130px">
                    <asp:LinkButton ID="lbtnCancel" runat="server" Text="取消" CommandName="Cancel"></asp:LinkButton>&nbsp;&nbsp;
                    <asp:LinkButton ID="lbtnUpdate" runat="server" Text="更新" CommandName="Update" ValidationGroup="Update"></asp:LinkButton>
                </td>
            </tr>
        </EditItemTemplate>
        <EmptyDataTemplate>
            没有数据<br />
            <br />
        </EmptyDataTemplate>
    </asp:ListView>
    <div style="padding: 4px; text-align: center;">
        <asp:DataPager ID="Pager" runat="server" PagedControlID="lvDate" OnPreRender="Pager_PreRender"
            PageSize="20">
            <Fields>
                <asp:NumericPagerField ButtonCount="10" CurrentPageLabelCssClass="CurrentPage" NumericButtonCssClass="Page" />
                <asp:NextPreviousPagerField ShowLastPageButton="true" ShowPreviousPageButton="true"
                    ShowFirstPageButton="true" />
                <asp:TemplatePagerField>
                    <PagerTemplate>
                        共<%=Pager.TotalRowCount%>条
                    </PagerTemplate>
                </asp:TemplatePagerField>
            </Fields>
        </asp:DataPager>
    </div>
    <asp:HiddenField ID="hdlGetUserID" runat="server" />
    <asp:HiddenField ID="hdlAddUserID" runat="server" />
    <script type="text/javascript">
        $(document).ready(function () {
            $("#search1").click(function () {
                OpenPage("../Client/Manage.aspx?IsOpen=1", "<%=hdlGetUserID.ClientID %>", "<%=txtGetUserName.ClientID %>");
            })
            $("#clear1").click(function () {
                ClearText("<%=hdlGetUserID.ClientID %>", "<%=txtGetUserName.ClientID %>");
            })
            $("#search2").click(function () {
                OpenPage("../Client/Manage.aspx?IsOpen=1", "<%=hdlAddUserID.ClientID %>", "<%=txtADdUserID.ClientID %>");
            })
            $("#clear2").click(function () {
                ClearText("<%=hdlAddUserID.ClientID %>", "<%=txtADdUserID.ClientID %>");
            })

        })
    </script>
    <script src="../../Scripts/jquery-easyui-1.3.1/jquery.easyui.min.js" type="text/javascript"></script>
</asp:Content>
